package com.millstein.tsinglog.exception;

import com.millstein.tsinglog.commons.enums.ResultCode;


public class TsinglogException extends RuntimeException {

	private ResultCode resultCode;

	public ResultCode getResultCode() {
		return resultCode;
	}

	/**
	 * 没有特定信息时，使用枚举中的信息给message赋值
	 * @param resultCode
	 */
	public TsinglogException(ResultCode resultCode) {
		super(resultCode.getMessage());
		this.resultCode = resultCode;
	}

	/**
	 * 有特定信息时，使用特定信息给message赋值
	 * @param resultCode
	 * @param msg
	 */
	public TsinglogException(ResultCode resultCode, String msg) {
		super(msg);
		this.resultCode = resultCode;
	}

}
